package com.sync.syncmasterdata.product.repository.bip;

import com.sync.syncmasterdata.product.entity.bip.BipProductEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

/**
 * Bip 物料 dao 持久类
 */
@Repository
public interface BipMaterialRepository extends JpaRepository<BipProductEntity,Integer> {

    /**
     * 获取BIP 客户code
     * @param pkProduct
     * @return
     */
    @Query(nativeQuery = true, value= "select code,pk_material from BD_SUPPLIER where pk_material=:pkProduct")
    BipProductEntity getProductCode(@Param(value = "pkProduct") String pkProduct);



}
